Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/middleware-serde

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/middleware-serde

[![NPM version](https://img.shields.io/npm/v/@smithy/middleware-serde/latest.svg)](https://www.npmjs.com/package/@smithy/middleware-serde) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/middleware-serde.svg)](https://www.npmjs.com/package/@smithy

  • 2.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14M
decreased by-16.24%
Maintainers
2
Weekly downloads
 
Created

What is @smithy/middleware-serde?

@smithy/middleware-serde is a middleware package for the Smithy framework that provides serialization and deserialization capabilities. It is used to convert data between different formats, such as JSON and XML, and to handle the transformation of request and response data in a consistent manner.

What are @smithy/middleware-serde's main functionalities?

Serialization Middleware

This feature allows you to add serialization middleware to a Smithy client. The middleware handles the conversion of request data into the appropriate format before sending it to the server.

const { getSerdePlugin } = require('@smithy/middleware-serde');
const { Client } = require('@smithy/client');

const client = new Client({
  region: 'us-west-2',
  plugins: [getSerdePlugin()]
});

// Example request
const request = {
  operation: 'SomeOperation',
  input: { key: 'value' }
};

client.send(request).then(response => {
  console.log(response);
}).catch(error => {
  console.error(error);
});

Deserialization Middleware

This feature allows you to add deserialization middleware to a Smithy client. The middleware handles the conversion of response data from the server into the appropriate format for the client.

const { getSerdePlugin } = require('@smithy/middleware-serde');
const { Client } = require('@smithy/client');

const client = new Client({
  region: 'us-west-2',
  plugins: [getSerdePlugin()]
});

// Example request
const request = {
  operation: 'SomeOperation',
  input: { key: 'value' }
};

client.send(request).then(response => {
  console.log(response);
}).catch(error => {
  console.error(error);
});

Other packages similar to @smithy/middleware-serde

FAQs

Package last updated on 14 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc